 import java.io.*;
 class SerializationDemo{
	 
	private String name;
	private String address;
	private int SSN;
	private int number;

	public static void main(String[] args) {
		Employee e = new Employee();
		e.name = "Jack Sparrow";
		e.address = " Felight, Bangalore";
		e.SSN= 111222;
		e.number = 101;
		try {
			FileOutputStream fileOut = new FileOutputStream("employee.ser");
			ObjectOutputStream out = new ObjectOutputStream(fileOut);
			out.writeObject(e);
			out.close();
		}
		catch(IOException i) {
			i.printStackTrace();
		}
	}

}